package com.wenjiang.common.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class GoodInfo implements Serializable {
    //商品id
    private Long goodId;

    //商品名称
    private String goodName;


    //原价
    private Double goodPrice;

    //商品价格(现在)
    private Double goodNowPrice;


    //商品图片
    private String goodImgUrl;


    //上架时间 指定序列化 存入redis
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime goodCreateTime;


    //存货
    private int goodCount;


    //销量
    private Long goodSell;





}
